<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="__CSS__/global.css" />
<link rel="stylesheet" type="text/css" href="__CSS__/product-index.css" />
<title>产品管理-HDCWS后台管理系统</title>
</head>
<body>
<div id="dcWrap">
	<include file="Pub:header" />
	<include file="Pub:menu" />
 	<div id="dcMain">
		<div id="urHere">管理中心<b>&gt;</b><strong>产品列表</strong></div>
		<div id="mainBox">
	    	<h3><a href="{:U('Product/add')}" class="actionBtn add">添加产品</a>产品列表</h3>
		    <div class="filter">
				<form action="{:U('Product/index')}">
					<select name="cid">
						<option value="">全部</option>
						<volist name="catList" id="vo">
						<option value="{$vo.id}">{$vo.name}</option>
						</volist>
					</select>				
			   		<input name="key" type="text" class="inpMain" value="" size="20" placeholder="输入产品名称或关键词" />
			     	<input name="submit" class="btnGray" type="submit" value="搜索" />
			    </form>
			</div>
	        <div id="list">
			    <form name="action" action="{:U('Product/del')}"  onsubmit="if(!confirm('确定删除吗?')) return false;">
				    <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
				    	<tr>
					      	<th width="22" align="center"><input name="chkall" type="checkbox" id="chkall" onclick="selectcheckbox(this.form)" value="check"></th>
					      	<th align="left">产品名称</th>
					      	<th width="100" align="left">价格(单位:分)</th>
					      	<th width="100" align="left">类型</th>
					      	<th width="200" align="left">购买链接</th>
					      	<th width="120" align="center">导航链接</th>
					      	<th width="120" align="center">添加时间</th>
					      	<th width="50" align="center">状态</th>
					      	<th width="150" align="center">操作</th>
				     	</tr>
				     	<volist name="list" id="vo">
				      	<tr>
							<td align="center"><input type="checkbox" name="id[]" value="{$vo.id}"></td>
							<td>{$vo.name}</td>
							<td>{$vo.price}</td>
							<td>{$vo.cname}</td>
							<td>{$vo.buypurl}</td>
							<td align="center">Product/v?cid={$vo['cid']}&id={$vo['id']}</td>
						  	<td align="center">{$vo.time}</td>
						   	<td align="center">
								<switch name="vo.status">
								<case value="0"><span style="color:#F75557;">禁用</span></case>
								<default /><span style="color:#45BA6C;">启用</span>
								</switch>						   	
						   	</td>
						  	<td align="center">
						  		<a href="__ROOT__/Product/v?cid={$vo['cid']}&id={$vo['id']}" target="_blank">前台查看</a>&nbsp;|&nbsp;
				           		<a href="{:U('Product/edit?id='. $vo['id'])}">编辑</a>&nbsp;|&nbsp;
				           		<a href="javascript:void(0)" data-href="{:U('Product/del?id='. $vo['id'])}" onclick="if(confirm('确定删除吗?')) top.location.href=this.getAttribute('data-href')">删除</a>
				           	</td>
				     	</tr>
				     	</volist>
			    	</table>
			    	<div class="action">
			     		<input name="submit" class="btn" type="submit" value="删除" />
			    	</div>
			    </form>
	    	</div>
	    	<div class="clear"></div>
	    	<div class="pager">{$pageLink}</div>
	    </div>
	</div>
	<include file="Pub:footer" />
</div>
</body>
</html>